window.addEventListener('load', function () {
    var cloud = document.querySelector('.cloud');
    var lis = document.querySelectorAll('li');
    var current = 0;
    for (i = 0; i < lis.length; i++) {
        lis[i].addEventListener('mouseenter', function () {
            animate(cloud, this.offsetLeft);
        })
        lis[i].addEventListener('mouseleave', function () {
            animate(cloud, current);
        })
        lis[i].addEventListener('click', function () {
            current = this.offsetLeft;
        })

    }



















})